<?php
namespace Api\Controller;
use Think\Controller;
class ShowsController extends Controller {
    public function getShows(){

        // $m_id = $_GET['m_id'];

        $show = M('show');
        $data = $show -> order("s_id")->select();

        echo json_encode($data);
         echo "<br>";

    }
    function delshow(){
      $id=$_GET['id'];
      $model = new foodModel();
      $result = $model->delshow($id);
      if($result){
        echo '删除成功<a href="admin.php?c=food&m=listfoods">
        如果没有跳转，请点这里跳转</a>';
        header("refresh:30;url='admin.php?c=food&m=listfoods'");
      }
      else{
        echo "删除失败!<br/>";
        echo "<a href='admin.php?c=food&m=listfoods'>返回</a>";
      }
}
?>